﻿#ifndef _CSERVER_MAIN_MODULE_H_
#define _CSERVER_MAIN_MODULE_H_

#include "../basic/CModule.h"
#include "../basic/CMsg.h"
#include "CUser.h"
#include "MiscDefine.h"

#ifdef __cplusplus
extern "C" {
#endif

#define USER_MAX	4

typedef struct _cservermain_module_ {
	CModule parent;

	//attribute
	CMap users_map;
	int game_user_count;
	char piles[ITEM_WIDTH_COUNT * ITEM_HEIGHT_COUNT]; //[32 * 25]

	//action
	int(*send_msg_to_all_users)(struct _cservermain_module_* thes, CMsg* msg);
} CServerMainModule;

int construct_server_main(CServerMainModule* thes, const char* module_name);

#ifdef __cplusplus
}
#endif
#endif
